<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="inc :: header('合同新增')"/>
</head>
<body>
    <form id="dataForm" class="layui-form layui-form-pane" style="margin: 10px">
        <div class="layui-form-item">
            <label class="layui-form-label">合同编号</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" readonly  id="agreementId" th:value="${agr.agreementId}"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">出租方</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" readonly th:value="${agr.getUserIdcard}"/>
            </div>
            <div class="layui-form-mid">
                <!--身份证:44654654564&nbsp;&nbsp;出租房源:乾隆天下-B栋1001 116m<sup>2</sup>-->&nbsp;
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">承租方</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" readonly th:value="${agr.setUserIdcard}"/>
            </div>
            <div class="layui-form-mid" id="setContent">
                &nbsp;
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">租金</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input"  readonly placeholder="请输入租金" th:value="${agr.getMoney}">
            </div>
            <div class="layui-form-mid">
                <input type="radio" class="layui-input" readonly name="getDw" value="year" title="年度" th:checked="${agr.getDw =='year'}">
                <input type="radio" class="layui-input" readonly name="getDw" value="season" title="季度" th:checked="${agr.getDw =='season'}">
                <input type="radio" class="layui-input" readonly name="getDw" value="month"  title="月份" th:checked="${agr.getDw =='month'}">
                <input type="radio" class="layui-input" readonly name="getDw" value="day" title="天" th:checked="${agr.getDw =='day'}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">签订时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="startDate"  readonly th:value="${#dates.format(agr.createDate,'yyyy-MM-dd')}">
            </div>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="endDate"  readonly th:value="${#dates.format(agr.enDate,'yyyy-MM-dd')}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">租金涨幅比</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" readonly name="zfb" th:value="${agr.zfb}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电表读数</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input"  name="eleNumberStart" readonly th:value="${agr.eleNumberStart}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">水表读数</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input"  name="waterNumberStart" readonly th:value="${agr.waterNumberStart}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">附件列表</label>
            <div class="layui-input-block">
                <div class="layui-upload">
                    <div class="layui-upload-list">
                        <table class="layui-table">
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>文件名称</th>
                                    <th>大小</th>
                                    <th>文件类型</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody id="fileList">
                                <tr th:each="fs,indexStatus: ${agr.list}">
                                    <td th:text="${indexStatus.index+1}"></td>
                                    <td th:text="${fs.oldFilename}"></td>
                                    <td th:text="${fs.fileSize}+'kb'"></td>
                                    <td th:text="${fs.strDate}"></td>
                                    <td>
                                        <a class="layui-btn layui-btn-xs" th:href="'/fc/download/'+${fs.id}">下载</a>
                                    </td>

                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <script>
        var form,files=[];
        layui.use(['form','upload','laydate'],function () {


        });

    </script>
</body>
</html>